<template>
    <div>
      <input type="button" value="-" @click="ReduceHandle">
      <span>Count is {{count}}</span>
      <input type="button" value="+" @click="AddHandle">
    </div>
</template>

<script>
  import {mapState , mapMutations} from 'vuex'

    export default {
        name: 'home',
        computed:{
          ...mapState(['count'])
        },

        methods:{

//          AddHandle(){
//            this.$store.commit('AddNumber')
//          },
          ...mapMutations({
            AddHandle:'AddNumber'
          }),

//          ReduceHandle(){
//              this.$store.commit('ReduceNumber')
//          }
          ...mapMutations({
            ReduceHandle:'ReduceNumber'
          })
        }
    }
</script>
<style>

</style>
